/*
import java.util.Scanner;

*
 * Created with IntelliJ IDEA.
 * Description:
 * User: HP
 * Date: 2022-04-29
 * Time: 14:20
 */

/**public class SumOfnum {
    static int sum(int n){
        assert n>0?true:false;
        if(n<10){
            return n;
        }else{
            return (n%10)+sum(n/10);
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            System.out.println(sum(n));
        }
    }
}
*/
